import request from "@/utils/request.js"

export const getPlaneGratia = () => request.get('ml/get-gratia')

export const getPriceList = (name1, name2) => request.get(`ml/get-priceList?areaName1=${name1}&areaName2=${name2}`)

export const getMinPrice = (area1,area2)=>request.get(`ml/get-min-price?areaName1=${area1}&areaName2=${area2}`)

export const getCompany = (date)=>request.get(`/ml/get-company?date=${date}`)

export const getPlaneList = (date,area1,area2,company1,company2,company3,time1,time2,time3,time4) => request.get(`ml/get-aircraft-list?date=${date}&area1=${area1}&area2=${area2}&company1=${company1}&company2=${company2}&company3=${company3}&time1=${time1}&time2=${time2}&time3=${time3}&time4=${time4}`)

export const getPlaneById=(id)=>request.get('ml/get-aircraft-by-id?id='+id)

export const insertOrder=(data)=>request.post('insert-order',data)

//景点订单生成
export const insertScenicOrder=(uid,orderNumber,orderName,price)=>request.get(`insert-scenic-order?uid=${uid}&orderNumber=${orderNumber}&orderName=${orderName}&price=${price}`)

export const showOrderList=(type)=>request.get('get-order-list?type='+type)

export const pay=(subject,traceNo,totalAmount)=>request.get(`/alipay/pay?subject=${subject}&traceNo=${traceNo}&totalAmount=${totalAmount}`)

export const browse=()=>request.get('show-history-list')

export const showCollection=()=>request.get('sc/collectionListByUid')

export const removeCollection=(id)=>request.delete('sc/delete-collection?id='+id)